package com.wbs.service.error;

import com.wbs.service.canonical.ErrorResponseBean;


/** Method that represent Invalid Request Exception */
public class InvalidRequestException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /** Represent error response */
    private ErrorResponseBean errorResponseBean;

    /** Constructor */
    public InvalidRequestException(String message){
        super(message);
        this.errorResponseBean = new ErrorResponseBean("ERROR", message);
    }

    /** Constructor */
    public InvalidRequestException(String message, ErrorResponseBean errorResponseBean){
        super(message);
        this.errorResponseBean = errorResponseBean;
    }

    /** Method to get error response */
    public ErrorResponseBean getErrorResponseBean() {
        return errorResponseBean;
    }

}